package com.matrix.java.chap_07;

import com.matrix.java.util.ArrayUtil;

/*
    统计一位数的个數
 */
public class Ex7_07 {
    public static void main(String[] args) {
        int[] arr = new int[100];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = (int) (Math.random() * 10);
        }
        int[] a = ArrayUtil.arrayUnrepeated(arr);
        int[] b = ArrayUtil.arrayElementCount(arr);
        for (int i = 0; i < a.length; i++) {
            System.out.println(a[i] + "\t" + b[i]);
        }
    }
}
